﻿using System.Collections.Generic;

namespace FastMapper.Helpers
{
    public static class LinqExtensions
    {
        public static void AddRange<T>(this IList<T> @this,IEnumerable<T> elements)
        {
            if(@this == null || elements == null)
                return;
            foreach (var element in elements)
            {
                @this.Add(element);
            }
        }

        public static void AddRange<T>(this ICollection<T> @this, IEnumerable<T> elements)
        {
            if (@this == null || elements == null)
                return;
            foreach (var element in elements)
            {
                @this.Add(element);
            }
        }
    }
}